package edu.pku.sei.transformation.editor.controller.commands.link;

import edu.pku.sei.transformation.editor.model.execution.ControlFlow;
import edu.pku.sei.transformation.editor.model.execution.Node;

public class ControlFlowDeleteCommand extends
		AbstractLinkDeleteCommand<ControlFlow, Node, Node> {
	public ControlFlowDeleteCommand(ControlFlow link, Node source, Node target) {
		super(link, source, target);
	}

	@Override
	public void execute() {
		source.getOutgoings().remove(this.link);
		target.getIncomings().remove(this.link);
	}

	@Override
	public void undo() {
		source.getOutgoings().add(this.link);
		target.getIncomings().add(this.link);
	}

}
